package com.ruoyi.web.controller.tlc.api;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.tlc.TlcFaq;
import com.ruoyi.system.service.tlc.ITlcFaqService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * 参数配置 信息操作处理
 * 
 * @author ruoyi
 */
@RestController
@RequestMapping("/api/faq")
public class TlcFaqController extends BaseController
{
    @Autowired
    private ITlcFaqService tlcFaqService;

    @GetMapping("/list")
    public TableDataInfo list()
    {
        startPage();
        LambdaQueryWrapper<TlcFaq> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.orderBy(true,false,TlcFaq::getTop);
        queryWrapper.orderBy(true,true,TlcFaq::getSort);
        List<TlcFaq> list = tlcFaqService.list(queryWrapper);
        return getDataTable(list);
    }

}
